package com.xiaotu.exThread;

/**
 * @Author xiaotu
 * @Description //TODO
 * @Date 2022/3/24 16:24
 * @ClassName ExtendsTread
 * @Version 1.0
 * 多线程实现方式一:继承Thread 并重写run()方法,调用这个对象的start()方法
 **/

public class ExtendsTread extends Thread{
    @Override
    public void run() {
        for (int i = 0; i < 32; i++) {
            System.out.println("我在执行多线程=====>"+i+Thread.currentThread().getName());
        }
    }

    public static void main(String[] args) {
        ExtendsTread extendsTread = new ExtendsTread();
        extendsTread.start();
        for (int i = 0; i < 33; i++) {
            System.out.println("我在执行主函数=-=====>>"+i+Thread.currentThread().getName());
        }
    }
}
